home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / rnet108u.zip / MAILRUN.BAT < prev    next >
DOS Batch File  |  1992-07-27  |  3KB  |  82 lines

  1. echo off
  2. cls
  3. echo %0 Processing... %1   [Example batch for event]
  4. rem ┌─────────────────────────────────────────────────────────────────────────┐
  5. rem │  Sample MAILRUN.BAT file for executing RNET/Qmail/PCBoard based echo    │
  6. rem │  conferencing.  This batch file should be executed daily or as often    │
  7. rem │  as needed to import/export mail to/from your host system.              │
  8. rem └─────────────────────────────────────────────────────────────────────────┘
  9.  
  10. if '%1'=='' goto BADID
  11. goto MAIL
  12.  
  13. :BADID
  14. echo ┌────────────────────────────────────────────────────────────────────────┐
  15. echo │ Warning!  This batch file requires the host packet ID as a parameter!  │
  16. echo └────────────────────────────────────────────────────────────────────────┘
  17. echo Examples:
  18. echo           %0 FTL        (for Faster-Than-Light as host)
  19. echo           %0 TRP        (for The Right Place as host)
  20. echo           %0 CHEERS     (for Cheers! SuperRegional as host)
  21. echo           %0 EXECNET    (for Executive Network as host)
  22. echo %0 started without host ID parameter! >> ERROR.LOG
  23. goto ABORTMAIL
  24.  
  25. :MAIL
  26.  
  27. e:
  28. cd \rnet
  29.  
  30. rem ┌─────────────────────────────────────────────────────────────────────────┐
  31. rem │ Export mail which is for your host.  Finds mail in conferences which    │
  32. rem │ needs to be sent up to host system.  If the *.REP packet is present,    │
  33. rem │ RNET will automatically append new mail to the packet.                  │
  34. rem └─────────────────────────────────────────────────────────────────────────┘
  35.  
  36. RNET EXPORT %1
  37.  
  38. rem ┌─────────────────────────────────────────────────────────────────────────┐
  39. rem │ Send *.REP packet up to host and download *.QWK packet for importing.   │
  40. rem │ Replace this with your terminal program and script designed for this.   │
  41. rem │ Whatever your terminal program and script, if the REP packet is         │
  42. rem │ successfully uploaded, you MUST delete the REP packet or RNET will      │
  43. rem │ append tomorrows mail to the end!  You may simply rename or move the    │
  44. rem │ REP packet also.                                                        │
  45. rem └─────────────────────────────────────────────────────────────────────────┘
  46.  
  47. echo Removing any previous %1.QWK packets since they should not exist yet!
  48. if exist %1.QW? erase %1.QW?
  49.  
  50. rem ┌─────────────────────────────────────┐
  51. rem │ assumes script called (host_id).slc │
  52. rem └─────────────────────────────────────┘
  53.  
  54. echo Calling host...  using Telix script %1.slc  [in e:\telix\]
  55. cd \telix
  56. telix -s%1
  57. cd \rnet
  58.  
  59. rem ┌─────────────────────────────────────────────────────────────────────────┐
  60. rem │ Now IMPORT any new mail aquired from the host (*.QWK)                   │
  61. rem └─────────────────────────────────────────────────────────────────────────┘
  62.  
  63. if not exist %1.QW? goto ABORTMAIL
  64.  
  65. RNET IMPORT %1
  66.  
  67. rem ┌─────────────────────────────────────────────────────────────────────────┐
  68. rem │ An error is reported if the QWK still exists after packet processing is │
  69. rem │ completed.  This assumes that you have KILLQWK=YES in your config.      │
  70. rem └─────────────────────────────────────────────────────────────────────────┘
  71.  
  72. if exist %1.QWK echo *** ERROR ***  QWK packet still exists!
  73. if exist %1.QWK echo *** ERROR ***  QWK packet still exists! >>ERROR.LOG
  74.  
  75. :ENDOFMAIL
  76.  
  77. echo %0 Processing of %1 Completed...,  returning to c:\pcb\ directory.
  78. :ABORTMAIL
  79. c:
  80. cd\pcb
  81.  
  82.